<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>OA协同办公系统</title>
<link href="css/table.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/openwindow.js"></script>
<script src="js/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<script type="text/javascript">
function taskCx(){
	var startTime1 =$("#startTime1").val();
	var startTime2 =$("#startTime2").val();
	if(startTime1 !=''){
		if(startTime2==''||startTime2=='null'){
			alert("填写结束时间");
			return;
		}
	}
	if(startTime2!=''){
		if(startTime1==''||startTime1=='null'){
			alert("填写开始时间");
			return;
		}
	}
	document.queryTaskCxForm.action="queryTaskCx.action";
	document.queryTaskCxForm.submit();
}

function getOldValue(val){
  var ids=document.getElementById(val+"ids").value;
  var names=document.getElementById(val+"names").value;
    var array="";
  if(ids!=''&&ids!='null'){
  var idarray=ids.split(",");
  var namearray=names.split(",");
  for(var i=0;i<idarray.length;i++){
  		if(i==0){
  			array+="{\"value\":"+idarray[i]+",\"name\":\""+namearray[i]+"\"}";
  		}else{
  	      	array+=",{\"value\":"+idarray[i]+",\"name\":\""+namearray[i]+"\"}";
  	   } 
  }
  }
  return array;
}

function setValue(value,val){
  var arr = eval(value);
  var names = "";
  var ids = "";
  for(i=0;i<1;i++){
    ids =  ids + "," + arr[i].value;
    names = names + "," + arr[i].name;
  }
  if(names.length>0){
    names = names.substring(1);
    ids =  ids.substring(1);
  }
  document.getElementById(val+"names").value=names;
  document.getElementById(val+"ids").value=ids;
}

function selectUser(val){
		var url="getGrouphome.action?status="+val;
		openWindow(url,700,400);
}
</script>
</head>
<body>
<table align="center" border="0" cellpadding="0" cellspacing="0" width="98%">
  <tbody><tr class="noprint">
    <td background="image/wsoa_window_002.gif" width="1"></td>
    <td background="image/wsoa_window_002.gif"><table border="0" cellpadding="0" cellspacing="0">
      <tbody><tr>
        <td align="center" background="image/wsoa_window_002.gif" width="10"><img src="image/center_19.gif"></td>
        <td align="center" background="image/wsoa_window_002.gif"><span class="tfont12"></span></td>
        <td>个人办公 &gt; 日程安排 &gt; 日程查询</td>
        </tr>
    </tbody></table></td>
    <td background="image/wsoa_window_002.gif" width="1"></td>
  </tr>
  <tr>
    <td background="image/wsoa_window_010.gif" width="1">&nbsp;</td>
    <td>
<div id="top" style="">
<br>
	<form method="post" name="queryTaskCxForm" action="">
	<table class="table5" align="center" width="100%">
		<tbody><tr>
			<td class="table5 bgcolor5" align="right" width="30%">日程主题</td>
			<td class="table5"><input name="title" maxlength="100" style="width: 380px;" title="该输入项的最大长度是100" type="text">
			</td>
		</tr>
		<tr>
			<td class="table5 bgcolor5" align="right">日程时间 </td>
			<td class="table5">
			<input  name="startTime"
			value="${startDate }" class="Wdate" id="startTime1" type="text"
			readonly="readonly"
			onclick="WdatePicker({maxDate:'#F{$dp.$D(\'startTime2\',{d:-0});}'})"
			id="startTime1" /> 
			至
			<input  name="endTime" value="${endDate}"
			class="Wdate" id="startTime2" type="text" readonly="readonly"
			onclick="WdatePicker({minDate:'#F{$dp.$D(\'startTime1\',{d:0});}'})"
			id="startTime2" />
			</td>
		</tr>
		<tr>
			<td class="table5 bgcolor5" align="right">知会对象 </td>
			<td class="table5">
			<textarea readonly="readonly" id="snames" name="names" style="width:99%;height:20px;">${names}</textarea>
			<input type="hidden" id="sids" name="notifyUserId" value="${users}">
			<a href="javascript:selectUser('s')">添加联系人</a>
			</td>
		</tr>
	</tbody></table>
	<table align="center" width="100%">
		<tbody><tr><td align="center"><span id="errorId"></span></td></tr>
		<tr>
			<td align="center">
				<input accesskey="q" value="查询" onclick="taskCx()" class="button_02" title="Query" type="button">  
			</td>	
		</tr>
	</tbody>
	</table>
	</form>
</div>
</td>
    <td background="image/wsoa_window_006.gif" width="1">&nbsp;</td>
  	</tr>
	  <tr class="noprint">
	    <td height="1" width="1"><img src="image/wsoa_window_009.gif" height="16" width="14"></td>
	    <td background="image/wsoa_window_008.gif" height="1"></td>
	    <td height="1" width="1"><img src="image/wsoa_window_007.gif" height="16" width="12"></td>
	  </tr>
	</tbody>
</table>
<br>
</body>
</html>